We present a new evolutionary model for the far-UV to sub-mm properties of the galaxy population. This combines a semi-analytic galaxy formation model based on hierarchical clustering (GALFORM) with a spectro-photometric code which includes dust reprocessing (GRASIL). The former provides the star formation and metal enrichment histories, together with the gas mass and various geometrical parameters, for a representative sample of galaxies formed in different density environments. These quantities allow us to model the SEDs of galaxies, taking into account stellar emission and also dust extinction and re-emission. Two phases are considered for the dust: molecular cloud complexes, where stars are assumed to be born, and the diffuse interstellar medium. The model includes both galaxies forming stars quiescently in disks, and starbursts triggered by galaxy mergers. We test our models against the observed spectro-photometric properties of galaxies in the local Universe. The models reproduce fairly well the SEDs of normal spirals and starbursts, and their internal extinction properties. The starbursts follow the observed relationship between the FIR to UV luminosity ratio and the slope of the UV continuum. They also reproduce the observed starburst attenuation law (Calzetti et al 99). This result is remarkable, because we use a dust mixture which reproduces the Milky Way extinction law. It suggests that the observed attenuation law is related to the geometry of the stars and dust. We compute galaxy luminosity functions over our wide range of wavelengths, which turn out to be in good agreement with observational data. The UV continuum turns out to be a poor star formation indicator for our models, whilst the infrared luminosity is much more reliable.